Optimal. Leaf size=80 \[ \frac{(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac{(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac{2 g^2 (x+1)}{\sqrt{1-x^2}}-g^2 \sin ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.143246, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {853, 1635, 789, 653, 216} \[ \frac{(x+1)^4 (f+g)^2}{5 \left (1-x^2\right )^{5/2}}+\frac{(x+1)^3 (f-9 g) (f+g)}{15 \left (1-x^2\right )^{3/2}}+\frac{2 g^2 (x+1)}{\sqrt{1-x^2}}-g^2 \sin ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 853
Rule 1635
Rule 789
Rule 653
Rule 216
Rubi steps
\begin{align*} \int \frac{(f+g x)^2 \sqrt{1-x^2}}{(1-x)^4} \, dx &=\int \frac{(1+x)^4 (f+g x)^2}{\left (1-x^2\right )^{7/2}} \, dx\\ &=\frac{(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}-\frac{1}{5} \int \frac{(1+x)^3 \left (-f^2+8 f g+4 g^2+5 g^2 x\right )}{\left (1-x^2\right )^{5/2}} \, dx\\ &=\frac{(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac{(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+g^2 \int \frac{(1+x)^2}{\left (1-x^2\right )^{3/2}} \, dx\\ &=\frac{(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac{(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac{2 g^2 (1+x)}{\sqrt{1-x^2}}-g^2 \int \frac{1}{\sqrt{1-x^2}} \, dx\\ &=\frac{(f+g)^2 (1+x)^4}{5 \left (1-x^2\right )^{5/2}}+\frac{(f-9 g) (f+g) (1+x)^3}{15 \left (1-x^2\right )^{3/2}}+\frac{2 g^2 (1+x)}{\sqrt{1-x^2}}-g^2 \sin ^{-1}(x)\\ \end{align*}
Mathematica [C] time = 0.151701, size = 91, normalized size = 1.14 \[ \frac{\sqrt{1-x^2} \left ((x+1)^{3/2} \left (f^2 (x-4)+f g (2-8 x)+g^2 (x-4)\right )-20 \sqrt{2} g^2 (x-1) \, _2F_1\left (-\frac{3}{2},-\frac{3}{2};-\frac{1}{2};\frac{1-x}{2}\right )\right )}{15 (x-1)^3 \sqrt{x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.064, size = 125, normalized size = 1.6 \begin{align*}{g}^{2} \left ({\frac{1}{ \left ( -1+x \right ) ^{2}} \left ( - \left ( -1+x \right ) ^{2}+2-2\,x \right ) ^{{\frac{3}{2}}}}+\sqrt{- \left ( -1+x \right ) ^{2}+2-2\,x}-\arcsin \left ( x \right ) \right ) +{\frac{2\,g \left ( f+g \right ) }{3\, \left ( -1+x \right ) ^{3}} \left ( - \left ( -1+x \right ) ^{2}+2-2\,x \right ) ^{{\frac{3}{2}}}}+ \left ({f}^{2}+2\,fg+{g}^{2} \right ) \left ({\frac{1}{5\, \left ( -1+x \right ) ^{4}} \left ( - \left ( -1+x \right ) ^{2}+2-2\,x \right ) ^{{\frac{3}{2}}}}-{\frac{1}{15\, \left ( -1+x \right ) ^{3}} \left ( - \left ( -1+x \right ) ^{2}+2-2\,x \right ) ^{{\frac{3}{2}}}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (g x + f\right )}^{2} \sqrt{-x^{2} + 1}}{{\left (x - 1\right )}^{4}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.05811, size = 432, normalized size = 5.4 \begin{align*} \frac{2 \,{\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{3} - 6 \,{\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} + 6 \,{\left (2 \, f^{2} - f g + 12 \, g^{2}\right )} x + 30 \,{\left (g^{2} x^{3} - 3 \, g^{2} x^{2} + 3 \, g^{2} x - g^{2}\right )} \arctan \left (\frac{\sqrt{-x^{2} + 1} - 1}{x}\right ) +{\left ({\left (f^{2} - 8 \, f g - 39 \, g^{2}\right )} x^{2} - 4 \, f^{2} + 2 \, f g - 24 \, g^{2} - 3 \,{\left (f^{2} + 2 \, f g - 19 \, g^{2}\right )} x\right )} \sqrt{-x^{2} + 1}}{15 \,{\left (x^{3} - 3 \, x^{2} + 3 \, x - 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{- \left (x - 1\right ) \left (x + 1\right )} \left (f + g x\right )^{2}}{\left (x - 1\right )^{4}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.3042, size = 359, normalized size = 4.49 \begin{align*} -g^{2} \arcsin \left (x\right ) + \frac{2 \,{\left (4 \, f^{2} - 2 \, f g + 24 \, g^{2} + \frac{5 \, f^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}}{x} - \frac{10 \, f g{\left (\sqrt{-x^{2} + 1} - 1\right )}}{x} + \frac{105 \, g^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}}{x} + \frac{25 \, f^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac{10 \, f g{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac{165 \, g^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{2}}{x^{2}} + \frac{15 \, f^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{3}}{x^{3}} - \frac{30 \, f g{\left (\sqrt{-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac{75 \, g^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{3}}{x^{3}} + \frac{15 \, f^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{4}}{x^{4}} + \frac{15 \, g^{2}{\left (\sqrt{-x^{2} + 1} - 1\right )}^{4}}{x^{4}}\right )}}{15 \,{\left (\frac{\sqrt{-x^{2} + 1} - 1}{x} + 1\right )}^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]